package com.briup.day14.bean;

//抽象类的子类：已经重写所有的抽象方法
public class Circle extends Shape {
    //属性：半径
    private double radius;

    //构造方法
    public Circle() {
        //super();
        System.out.println("in Circle() ...");
    }
    public Circle(double radius) {
        //super();
        System.out.println("in Circle(double) ...");
        this.radius = radius;
    }
    public Circle(String name, double radius) {
        super(name);
        System.out.println("in Circle(String,double) ...");
        this.radius = radius;
    }

    @Override
    public double getArea() {
        return Math.PI * radius * radius;
    }
}
